﻿@{
    MDF.Utilites.Tools.MyResult result = (MDF.Utilites.Tools.MyResult)ViewBag.Result;
    if (result.IsSuccess != 0)
    {
    <div id="mess" style="margin: 30px;">
        @if (result.IsSuccess > 0)
        {
            <text>
            <style>
                #message-blue
                {
                    margin-bottom: 5px;
                }
                #message-blue .entry
                {
                    margin: 3px;
                    padding: 5px;
                    font-weight: bold;
                    color: #2e74b2;
                    border: 1px solid #1A4974;
                }
            </style>
            <!--  start message-blue -->
            <div id="message-blue">
                @{
            for (int i = 0; i < result.ListMessage.Count; i++)
            { 
                    <div class="entry">
                        @Html.Raw(result.ListMessage[i])
                    </div>
            }
                }
            </div>
            <!--  end message-blue -->
            </text>
        }
        @if (result.IsSuccess < 0)
        {
            <text>
            <style>
                #message-red
                {
                    margin-bottom: 5px;
                }
                #message-red .entry
                {
                    margin: 3px;
                    padding: 5px;
                    font-weight: bold;
                    color: #D61321;
                    border: 1px solid #A5151F;
                }
            </style>
            <!--  start message-red -->
            <div id="message-red">
                @{
            for (int i = 0; i < result.ListMessage.Count; i++)
            { 
                <div class="entry">
                    @Html.Raw(result.ListMessage[i])
                </div>
            }
                }
            </div>
            <!--  end message-red -->
            </text>
        }
    </div>
    }
}
